using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using SampleApp.Domain;
using SampleApp.Domain.Map;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Configuration;

namespace SampleApp.Data
{
    public partial class SampleDbContext : DbContext
    {
        #region System
        public DbSet<ApplicationLog> ApplicationLogSet { get; set; }
        public DbSet<SysMenu> SysMenuSet { get; set; }
        public DbSet<SysDept> SysDeptSet { get; set; }
        public DbSet<SysUser> SysUserSet { get; set; }
        public DbSet<SysRole> SysRoleSet { get; set; }
        public DbSet<SysUserRole> SysUserRoleSet { get; set; }
        public DbSet<SysRoleMenu> SysRoleMenuSet { get; set; }
        //public DbSet<AppLog2> AppLog2Set { get; set; }

        private void RegistEntityMapSystem(ConfigurationRegistrar configuration)
        {
            configuration.Add(new SysMenuMap())
            .Add(new SysDeptMap())
            .Add(new SysUserMap())
            .Add(new SysRoleMap())
            .Add(new SysUserRoleMap())
            .Add(new SysRoleMenuMap())
            //.Add(new AppLog2Map())
            ;
        }

        #endregion

        private void RegistEntityMap(ConfigurationRegistrar configuration)
        {
            this.RegistEntityMapSystem(configuration);
            ;
        }

    }

}

